home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 147
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan).7z
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan) (Track 1).bin
/
games
/
ippon
/
source.lzh
/
FuncEffect
/
points.c
< prev
Wrap
C/C++ Source or Header
|
2000-07-07
|
763b
|
45 lines
/* point.c 得点表示パターン */
#include <xsp2lib.h>
#include "../main.h"
#include "../effect.h"
#define PALET_POINTS 0x0700
static short EffectMovePoints (EFFECT *);
/* エフェクト出現時に呼ばれる */
void EffectAllocPoints (EFFECT * p)
{
p->pt = obj_points + p->type2;
p->info = PALET_POINTS | PRIORITY_POINTS;
p->seq = 0;
p->func_effect_move = EffectMovePoints;
p->ly = p->y << 16;
p->vy = -1 << 14;
{
/* 一旦テンポラリにコピーした方が速い */
signed int t = points_table2[p->type2];
score += t;
}
}
/* 得点表示 */
static short EffectMovePoints (EFFECT * p)
{
/* 速度を足して上位ワード(固定整数部)だけ取り出す */
p->y = (p->ly += p->vy) >> 16;
p->seq++;
if (p->seq > 60)
return (-1);
else
xobj_set_st (p);
return (0);
}